// lib/main.dart
import 'package:flutter/material.dart';
import 'core/supabase_service.dart';
import 'pages/login_page.dart';
import 'pages/yewu.dart';

void main() async {
  // 确保Flutter引擎初始化
  WidgetsFlutterBinding.ensureInitialized();
  
  // 初始化Supabase（关键步骤）
  await SupabaseService.init(); 

  // 启动应用
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      routes: {
        '/': (context) => const HomePage(),//LoginPage(),
        '/home': (context) => const HomePage(),
      },
    );
  }
}